﻿using System.Collections.Generic;

using UnityEngine;

namespace ComponentAutoBind.Editor
{
    /// <summary>
    /// 自动绑定规则辅助器接口。
    /// </summary>
    public interface IAutoBindRuleHelper
    {
        /// <summary>
        /// 尝试解析能绑定的组件。
        /// </summary>
        /// <param name="target">目标组件。</param>
        /// <param name="fieldNames">存储解析成功绑定的字段名。</param>
        /// <param name="componentTypeNames">存储解析成功绑定的组件类型名。</param>
        /// <returns></returns>
        bool TryParseBindComponent(Transform target, List<string> fieldNames, List<string> componentTypeNames);

        /// <summary>
        /// 根据组件实例解析出对应字段名。
        /// </summary>
        /// <param name="target"></param>
        /// <returns></returns>
        string ParseFieldName(Component target);
    }
}